home *** CD-ROM | disk | FTP | other *** search
- /*
- Sounds.h
-
- Interface to Sounds.c
-
- A module to provide simple sound playing for After Dark modules.
-
- by Patrick C. Beard.
-
- 7/5/90 - One shot sound, returning handle to a structure that keeps information
- about the operating sound manager.
-
- 3/20/91 - Sound under A/UX 2.0.1 is not as we thought. It is based on
- system 6.0.7, and yet the sound manager doesn't support multiple channels of
- sound. Nuts. Need to use Gestalt to check for the sound input/output manager
- instead of testing the system version.
-
- 3/28/91 - Modifying interfaces to use call backs provided by After Dark. Requires
- addition of GMParams
-
- Copyright © 1990, 91 Berkeley Systems, Inc.
- */
-
- #ifndef __SOUNDS__
- #define __SOUNDS__
-
- #if THINK_C == 1
-
- #include <SoundMgr.h>
- typedef ProcPtr SndCallBackProcPtr;
-
- #else
-
- #ifndef __SOUND__
- #include <Sound.h>
- #endif
- #ifndef __OSUTILS__
- #include <OSUtils.h>
- #endif
-
- #endif
-
- #ifndef __GRAPHICSMODULE_TYPES__
- #include "GraphicsModule_Types.h"
- #endif
-
- #ifndef nil
- #define nil 0L
- #endif
-
- struct SoundInfo {
- long privateData; /* private storage. */
- Boolean soundDisabled; /* we can't play sound for various reasons. */
- Boolean hasSoundIOManager; /* we can call SndChannelStatus if true. */
- Boolean hasPowerManager; /* if a portable, then we have the power manager. */
- };
-
- typedef struct SoundInfo SoundInfo, **SoundInfoHandle;
-
- extern pascal SoundInfoHandle OpenSound(GMParamBlockPtr params);
- extern pascal void CloseSound(SoundInfoHandle info, SndChannelPtr channel);
- extern pascal void PlaySound(SoundInfoHandle info, SndChannelPtr channel, Handle sound);
- extern pascal void QuietSound(SoundInfoHandle info, SndChannelPtr channel);
- extern pascal void FlushSound(SoundInfoHandle info, SndChannelPtr channel);
- extern pascal long GetSoundLength(SoundInfoHandle info, Handle sound);
- extern pascal Boolean SoundBusy(SoundInfoHandle info, SndChannelPtr channel);
-
- #endif
-